package com.online.onlinestudent.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.online.onlinestudent.entity.Admin;
import com.online.onlinestudent.entity.Comment;
import com.online.onlinestudent.entity.Teacher;
import com.online.onlinestudent.mapper.AdminMapper;
import com.online.onlinestudent.service.AdminService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {
    @Override
    public List<Admin> fuzzyQueryByUsername(String username) {
        QueryWrapper<Admin> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("username", username);
        List<Admin> list=baseMapper.selectList(queryWrapper);
        if (list.isEmpty()||list==null){
            return new ArrayList<>();
        }
        return list;
    }
}
